home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / mail / pp / pp-6.0 / Src / LINEconsole / console.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-12-18  |  3.4 KB  |  178 lines

  1. /* console.h: include files and typedefs for lineconsole */
  2.  
  3. /*
  4.  * @(#) $Header: /xtel/pp/pp-beta/Src/LINEconsole/RCS/console.h,v 6.0 1991/12/18 20:26:30 jpo Rel $
  5.  *
  6.  * $Log: console.h,v $
  7.  * Revision 6.0  1991/12/18  20:26:30  jpo
  8.  * Release 6.0
  9.  *
  10.  *
  11.  */
  12. #ifndef _H_MTACONSOLE_CONSOLE
  13. #define _H_MTACONSOLE_CONSOLE
  14.  
  15. #include    "head.h"
  16. #include    "sys.file.h"
  17. #include    "qmgr.h"
  18. #include    <varargs.h>
  19. #include    <isode/cmd_srch.h>
  20.  
  21. typedef enum {
  22.     Unknown, Ambiguous,
  23.     Quit, Connect, Disconnect, Heuristics, Quecontrol,
  24.     Up, Down, Status, Set, Current, Refresh,
  25.     List, Enable, Disable, Delay, Clear, Info,
  26.     BelowClear, AboveClear, Next, Previous,
  27. } Command;
  28.  
  29. typedef enum { 
  30.         unknown, 
  31.         quit, connect, disconnect, quecontrol, qmgrStatus,
  32.         chanread, chanstop, chanstart, 
  33.         chancacheadd, chandownforce, chanclear, chaninfo,
  34.         channext, chanprev,
  35.         mtaread, mtastop, mtastart, 
  36.         mtacacheadd, mtaforce, mtadownforce, mtaclear, mtainfo,
  37.         mtanext, mtaprev,
  38.         readchannelmtamessage, msgstop, msgstart, 
  39.         msgcacheadd, msgforce, msgclear, msginfo,
  40.         msgnext, msgprev,
  41.         mtacontrol
  42. } Operations;
  43.  
  44. typedef enum {
  45.     top, 
  46.     channel,
  47.     mta,
  48.     msg
  49. } Level;
  50.  
  51.  
  52. typedef struct client_dispatch {
  53.     char            *ds_name;
  54.     int                ds_operation;
  55.     IFP                ds_argument;
  56. #ifdef PEPSY_VERSION
  57.     modtyp            *ds_fr_mod;
  58.     int                ds_fr_index;
  59. #else
  60.     IFP                ds_free;
  61. #endif
  62.     IFP                ds_result;
  63.     IFP                ds_error;
  64.     char            *ds_help;
  65. } Client_dispatch;
  66.  
  67. typedef    struct procStatus {
  68.     char    enabled;    /* boolean TRUE or FALSE */
  69.     time_t    lastAttempt,
  70.         cachedUntil,
  71.         lastSuccess;
  72. } ProcStatus;
  73.  
  74. typedef struct tailor {
  75.     char    *key;
  76.     double    ub_number,
  77.         ub_volume,
  78.         ub_age,
  79.         ub_last;
  80.     struct tailor *next;
  81. } TailorInfo;
  82.  
  83. /* 4 factors (num, vol, age, last) == max 400 % */
  84. #define max_bad_channel        400
  85.  
  86. /* 4 factors (num, vol, age, last) == max 400 % */
  87. #define max_bad_mta        400
  88.  
  89. /* 2 factors (vol, age) == max 200 % */
  90. #define max_bad_msg        200
  91.  
  92. typedef struct permsginfo {
  93.     char            *queueid;
  94.     char            *originator;
  95.     char            *contenttype;
  96.     char            *eit;
  97.     int            priority;
  98.     int            size;
  99.     time_t            expiryTime;
  100.     time_t            deferredTime;
  101.     time_t            age;
  102.     int            errorCount;
  103.     char            *inChannel;
  104.     char            *uaContentId;
  105. } Permsginfo;
  106.  
  107.  
  108.  
  109. typedef     struct recip {
  110.     int            id;
  111.     char            *recipient;
  112.     char            *mta;
  113.     char            *actChan;
  114.     char            *chansOutstanding;
  115.     struct procStatus    *status;
  116.     char            *info;
  117.     struct recip         *next;
  118. } Recip;
  119.  
  120.  
  121.  
  122. typedef struct msg_struct {
  123.     struct permsginfo     *msginfo;
  124.     struct recip        *reciplist;
  125.     struct tailor        *tai;
  126. } Msg_struct;
  127.  
  128.  
  129.  
  130. typedef struct mta_struct {
  131.     char            *mta;
  132.     time_t            oldestMessage;
  133.     int            numberMessages,
  134.                 numberReports,
  135.                 volumeMessages;
  136.     struct procStatus    *status;
  137.     int            priority;
  138.     char            active;
  139.     char            *info;
  140.     struct tailor        *tai;
  141. } Mta_struct;
  142.  
  143.  
  144.  
  145. typedef struct chan_struct {
  146.     char            *channelname,
  147.                 *channeldescrip;
  148.     time_t            oldestMessage;
  149.     int            numberMessages,
  150.                 numberReports,
  151.                  volumeMessages,
  152.                 numberActiveProcesses;
  153.     struct procStatus    *status;
  154.     int            priority;
  155.     struct mta_struct    **mtalist;
  156.     int            num_mtas;
  157.     int            given_num_mtas;
  158.     int            display_num;
  159.     int            inbound;
  160.     int            outbound;
  161.     int            chantype;
  162.     int            maxprocs;
  163.     struct tailor        *tai;
  164. } Chan_struct;
  165.  
  166. extern void openpager(), closepager(), update_status();
  167. extern char *command2str(), *lowerfy();
  168. extern Command get_command();
  169.  
  170. #define ssformat    "%-*s %s"
  171. #define sdformat    "%-*s %s"
  172. #define    plus_ssformat    "%s\n%-*s %s"
  173. #define plus_sdformat    "%s\n%-*s %d"
  174.  
  175. #define    tab        30
  176.  
  177. #endif
  178.